package com.gufe.other.config;

import com.gufe.controller.webSocket.WebSocketStarter;
import jakarta.annotation.Resource;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.context.annotation.Configuration;

@Configuration
public class NettyConfig implements ApplicationRunner {

    @Resource
    private WebSocketStarter webSocketStarter;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        // 在应用启动完成后异步启动 Netty
        webSocketStarter.startNetty();
    }
}
